package com.zombieprogrammer.juego;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Box2DDebugRenderer;
import com.badlogic.gdx.physics.box2d.World;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.zombieprogrammer.hub_visuales.Hub;
import com.zombieprogrammer.pantallas.Pantalla;
import com.zombieprogrammer.pantallas.Pantalla_Seleccion;

public class Juego_Base extends Game {

	// Variables
	public SpriteBatch batch;
	public Box2DDebugRenderer render_fisicas;
	private Pantalla pantalla;
	public Creador_Randmonster dios;
	public World mundo_fisico;
	public Stage escenario;
	public BitmapFont fuente;
	public Destructor destructor;
	private Vector2 gravedad = new Vector2(0, 0);
	public int ancho;
	public int alto;
	public float zoom;
	public float PPM = 9;
	public Hub hub;

	@Override
	public void create() {

		fuente = new BitmapFont();
		ancho = Gdx.graphics.getWidth();
		alto = Gdx.graphics.getHeight();
		zoom = (alto / 720f);
		PPM = PPM * zoom;
		System.out.println("PPM = " + PPM);
		batch = new SpriteBatch();
		render_fisicas = new Box2DDebugRenderer();
		// Selectro de Cuerpos
		// Creador de Randmonster
		dios = new Creador_Randmonster(this);
		// Creo mundo fisico
		mundo_fisico = new World(gravedad, true);
		destructor = new Destructor(mundo_fisico);
		// setScreen(pantalla = new Pantalla_Juego(this));
		setScreen(pantalla = new Pantalla_Seleccion(this));
	}

	public Pantalla getPantalla_juego() {
		return pantalla;
	}

	public void setPantalla_juego(Pantalla pantalla) {
		this.pantalla = pantalla;
		setScreen(pantalla);
	}

}
